from django.db import models

# Create your models here.


class student(models.Model):
    SEX_TYPE = (
        (0,'男'),
        (1, '女'),
    )
    name = models.CharField(max_length=40,verbose_name='用户名')
    age = models.IntegerField(default=0,verbose_name='年龄')
    # sex = models.BooleanField(default=True,verbose_name='性别')
    sex = models.IntegerField(null=True,blank=True, verbose_name='性别',choices=SEX_TYPE)
    qq = models.CharField(max_length=40,verbose_name='qq')
    email = models.CharField(max_length=40,verbose_name='邮箱')
    phone = models.CharField(max_length=40,verbose_name='手机号码')
    create_time = models.DateTimeField(auto_now_add=True,verbose_name='创建时间')

    class Meta:
        db_table = 'student'
        verbose_name = '学生表'
        verbose_name_plural = verbose_name



